CONTENTS | INDEX | PREV | NEXT

 FUNCTION
 Create Link Library

 SYNOPSIS
 libmake file options

 DESCRIPTION
 Libmake is a utility that will scan a file listings sources files for
 a library, determine what is out of date, compile the out of date
 modules (compile .c modules, assemble .a modules), and JOIN the whole
 thing together in the end to create a library.  Libmake is useful for
 creating large libraries that would otherwise overflow the command
 line length limit in DMakefile.

 Libmake takes several arguments, some optional:

   file  specify the control file that contains a list of source modules,
     see below.

 -v  verbose operation

 -n  dry run (do not actually compile/assemble/join anything)

 -Dmacro[=def]
     specify DCPP macro, i.e.  #define equivalent to be passed to all
     compiles.

 -o object_dir
     specify object directory prefix, if a directory must end in '/'
     or ':', allowing both file prefixes and directory paths.

 -l library
     specify library output file, usually something.lib

 -clean  instead of compiling/assembling/join'ing the library, delete ALL
     object modules from object_dir relating to the library.

    -pr  pass -pr option to DCC

 -proto  pass -proto option to DCC

   -mRR  specify reg-call opts to DCC.

    -mD  pass -mD to DCC, causes DCC to use the large-data model.  Default
     is to use the small-data model

    -mC  pass -mC to DCC, causes DCC to use the large-code model.  Default
     is to use the small-data model

  -prof  pass -prof to DCC, causes profiling code to be generated for all
     the routines in the library.

 CONTROL FILE
 The control file is named files.something by convention, for example,
 'files.c3lib', which happens to be the control file used generate
 C*.LIB.

 A control file may contain blank lines, lines that begin with a
 semi-colon (comments), and lines containing a file name optionally
 preceded by a '*'.  Here is an example:

 ; Full C library
 assert/assert.c
 assert/abort.c
 amiga/exit.c
 amiga/main.c
 amiga/wbmain.c
 *amiga/c.a
 *amiga/c_pi.a
 *amiga/c_pr.a
 *amiga/x.a
 amiga/config.a

 Lines beginning with a '*' tell LIBMAKE to compile/assemble the file
 but NOT to include the object module in the generated output library.

 Thus, in the above example amiga/c.a would be assembled but not made
 part of the DLIB:C.LIB

 Also note that the path specified for a given file is appended to the
 -o (object directory) specification.  Thus, if you were to use the
 following libmake line:

 1> libmake files.c3lib -o dtmp:xx/ -l dlib:xx.lib -pr -proto

 Then object modules would be created as follows:

 DTMP:XX/assert/assert.o
 DTMP:XX/assert/abort.o
 DTMP:XX/amiga/exit.o
 etc..

 You probably want to pre-create the directory structure required.
 Please refer to the library source archive for examples (no less than
 DMakefile's calling libmake to regenerate every single DICE library
 that exists!)

 NAMING CONVENTIONS
 In order to simplify the process, libmake makes assumptions about the
 type of file based on the extension.

 Extension : Libmake Action
 ==========+==========================================================
 .a        : Assemble with DAS
 ----------+----------------------------------------------------------
 .a68      : Assemble with external assembler A68K
 ----------+----------------------------------------------------------
 .o        : Insert specified object into destination library (raw
           : copy)
 ----------+----------------------------------------------------------
 .lib      : Insert specified library into destination library (raw
           : copy)
 ----------+----------------------------------------------------------
 other     : Assumed to be a C source file to compile with DCC
 ----------+----------------------------------------------------------